;
; File generated by cc65 v 2.17 - Git 8fd1db4
;
	.fopt		compiler,"cc65 v 2.17 - Git 8fd1db4"
	.setcpu		"6502"
	.smart		on
	.autoimport	on
	.case		on
	.debuginfo	off
	.importzp	sp, sreg, regsave, regbank
	.importzp	tmp1, tmp2, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
	.macpack	longbranch
	.forceimport	__STARTUP__
	.import		_pal_bg
	.import		_pal_spr
	.import		_ppu_wait_nmi
	.import		_ppu_off
	.import		_ppu_on_all
	.import		_oam_clear
	.import		_oam_spr
	.import		_bank_spr
	.import		_bank_bg
	.export		_x_pos
	.export		_y_pos
	.export		_spr_idx
	.export		_palette_bg
	.export		_palette_sp
	.export		_main

.segment	"DATA"

_x_pos:
	.byte	$40
_y_pos:
	.byte	$40

.segment	"RODATA"

_palette_bg:
	.byte	$0F
	.byte	$00
	.byte	$10
	.byte	$30
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
_palette_sp:
	.byte	$0F
	.byte	$00
	.byte	$10
	.byte	$30
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00
	.byte	$00

.segment	"BSS"

_spr_idx:
	.res	1,$00

; ---------------------------------------------------------------
; void __near__ main (void)
; ---------------------------------------------------------------

.segment	"CODE"

.proc	_main: near

.segment	"CODE"

	jsr     _ppu_off
	lda     #<(_palette_bg)
	ldx     #>(_palette_bg)
	jsr     _pal_bg
	lda     #<(_palette_sp)
	ldx     #>(_palette_sp)
	jsr     _pal_spr
	lda     #$00
	jsr     _bank_bg
	lda     #$01
	jsr     _bank_spr
	jsr     _ppu_on_all
L002F:	jsr     _ppu_wait_nmi
	jsr     _oam_clear
	lda     #$00
	sta     _spr_idx
	jsr     decsp4
	lda     _x_pos
	ldy     #$03
	sta     (sp),y
	lda     _y_pos
	dey
	sta     (sp),y
	lda     #$00
	dey
	sta     (sp),y
	dey
	sta     (sp),y
	lda     _spr_idx
	jsr     _oam_spr
	sta     _spr_idx
	inc     _x_pos
	jmp     L002F

.endproc

